﻿// =================================================================== 
// 数据访问层接口层(GDIT.Pattern)
//====================================================================
// 文件：ICollegeInformationArticle.cs
// 项目名称：学院网站
// 创建时间：2012-08-08
// 负责人：ChenZhiGang
//引用DevExpress.Xpo程序集
// 程序集介绍：校园资讯文章信息数据访问层接口
// ===================================================================
using GDIT.Model;
using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GDIT.Pattern
{
    public interface ICollegeInformationArticle
    {

        /// <summary>
        /// 管理员展示页面
        /// </summary>
        /// <returns></returns>
        XPCollection SelectAllColegeByAdmin();

        /// <summary>
        /// 新增加一篇校园资讯
        /// </summary>
        /// <param name="bulletin">需要增加的校园资讯对象</param>
        /// <returns>1：新增成功  0：新增失败</returns>
        int InsertCollegeInformationArticle(Mtb_CollegeInformationArticle bulletin);

        /// <summary>
        /// 根据关键字查询并返回校园资讯集合
        /// </summary>
        /// <param name="keyWord">输入的关键字</param>
        /// <returns></returns>
        XPCollection SelectCollegeByKeyWord(string keyWord);

        /// <summary>
        /// 删除一篇校园资讯
        /// </summary>
        /// <param name="bulletin">需要删除的校园资讯对象</param>
        /// <returns>1：删除成功  0：删除失败</returns>
        int DeleteCollegeInformationArticle(int id);

        /// <summary>
        /// 更新一篇校园资讯
        /// </summary>
        /// <param name="bulletin">需要更新的校园资讯的对象</param>
        /// <returns>1：删除成功  0：删除失败</returns>
        int UpdateCollegeInformationArticle(Mtb_CollegeInformationArticle bulletin);

        /// <summary>
        /// 增加校园资讯的点击率
        /// </summary>
        int AddCollegeInformationArticleCounter(int id);

        /// <summary>
        /// 查询所有的校园资讯列表
        /// </summary>
        /// <returns>返回所有的校园资讯列表</returns>
        XPCollection SelectAllCollegeInformationArticle();

        /// <summary>
        /// 查询所有非置顶，重点，是内部的校园资讯列表
        /// </summary>
        /// <returns>返回所有的校园资讯列表</returns>
        XPCollection SelectAllInternalCollegeInformationArticle();

        /// <summary>
        /// 根据校园资讯Id查询并返回校园资讯单一记录
        /// </summary>
        /// <param name="id">需要查询的校园资讯Id</param>
        /// <returns>返回校园资讯单一记录</returns>
        Mtb_CollegeInformationArticle SelectCollegeInformationArticleById(int id);

        /// <summary>
        /// 根据部门名称查询并返回该部门的所有校园资讯列表
        /// </summary>
        /// <param name="name">需要查询的部门名称</param>
        /// <returns>返回该部门的校园资讯列表</returns>
        XPCollection SelectCollegeInformationArticleByDepartment(string departmentName);

        /// <summary>
        /// 显示置顶校园资讯
        /// </summary>
        /// <returns>返回置顶校园资讯列表</returns>
        XPCollection SelectCollegeInformationArticleByTop();

        /// <summary>
        /// 显示重点校园资讯
        /// </summary>
        /// <returns>返回重点校园资讯列表</returns>
        XPCollection SelectCollegeInformationArticleByImportant();

        /// <summary>
        /// 显示内部置顶校园资讯
        /// </summary>
        /// <returns>返回置顶公告列表</returns>
        XPCollection SelectInternalCollegeInformationArticleByTop();

        /// <summary>
        /// 显示内部重点学院咨询
        /// </summary>
        /// <returns>返回重点公告列表</returns>
        XPCollection SelectInternalCollegeInformationArticleByImportant();

        /// <summary>
        /// 设置校园资讯为内部显示
        /// </summary>
        /// <returns>返回内部校园资讯列表</returns>
        int SelectCollegeInformationArticleByInternal(Mtb_CollegeInformationArticle college);

        /// <summary>
        /// 设置公告为重点显示
        /// </summary>
        /// <returns>1：更新成功  0：更新失败</returns>
        int UpdateCollegeInformationArticleByImportant(Mtb_CollegeInformationArticle college);

        /// <summary>
        /// 设置公告为置顶显示
        /// </summary>
        /// <returns>1：更新成功  0：更新失败</returns>
        int UpdateCollegeInformationArticleByTop(Mtb_CollegeInformationArticle college);

        /// <summary>
        /// 显示首页的校园资讯内容
        /// </summary>
        /// <returns></returns>
        XPCollection SelectCollegeInformationArticleByTopAndImportant();

        /// <summary>
        /// 显示内部首页的校园资讯内容
        /// </summary>
        /// <returns></returns>
        XPCollection SelectInternalBulletinArticleByTopAndImportant();
    }
}
